﻿ 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; 
using SageKing.Database.Features;

namespace SageKing.Database.EF.Features;

[DependsOn(typeof(SageKingDatabaseFeature))]
public class SageKingDatabaseEFFeature : FeatureBase
{
    public SageKingDatabaseEFFeature(IModule module) : base(module)
    {
    } 

    /// <summary>
    /// Represents the options for SageKingDatabaseSqlSugars feature.
    /// </summary>
    public Action<TemplateStoreOptions> Options { get; set; } = _ => { };


    /// <inheritdoc />
    public override void Apply(IConfigurationManager configurationManager, IHostEnvironment hostEnvironment)
    {
        Services.Configure(Options);
        Services.AddTemplateStore<TemplateContext>(Options);
    }
}
